﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using Sl.Log;

namespace ChholConfig {
	internal static class Program {
		public static string version = "V1.2.7B";


		public static Logger Log = new LoggerToConsole();

		/// <summary>
		/// 应用程序的主入口点。
		/// </summary>
		[STAThread]
		static void Main(string[] args) {
			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);
			if (args.Length == 0) {
				var main_form = new ChholCommunicator();
				main_form.Show();
				main_form.searchPort();
				Application.Run(main_form);
			} else if (args.Length == 1) {
				var main_form = new ChholCommunicator();
				main_form.Show();
				main_form.openFixPort(args[0]);
				Application.Run(main_form);
			}
		}

	}
}
